package com.jacob.cloud.mall.cartorder.feign;

import com.jacob.cloud.mall.categoryproduct.model.pojo.Product;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @ClassName ProductFeignClient
 * @Description Product模块Feign客户端
 * @Author dust_fall
 * @Date 2022/7/3 21:34
 * @Version 1.0
 */
@FeignClient(value = "mall-cloud-category-product")
public interface ProductFeignClient {

    @GetMapping("/product/detailForFeign")
    public Product detailForFeign(@RequestParam Integer id);

    @PostMapping("/product/updateStock")
    void updateStock(@RequestParam Integer productId, @RequestParam Integer stock);

}
